import  request  from "@/utils/request";

enum API{
    POST_SAVE_CHANNELS="/mp/articles",
}

interface saveChannelsData{
    title:string,
    channel_id: number|string,
    content:string
}

export  const postSaveChannels =(data:saveChannelsData)=>{
    return request.post(API.POST_SAVE_CHANNELS+`?draft=false`,data)
  }

  export  const putSaveChannels =(data:any,id:string)=>{
   return request.put(API.POST_SAVE_CHANNELS+`/${id}?draft=false`,data)
 }